package com.itany;

import com.itany.crawler.Main;
import com.itany.utils.Log;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.test.context.SpringBootTest;

import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
import java.util.Date;

//@SpringBootApplication
@SpringBootTest
public class StartCrawler {


    public static void main(String[] args) throws Exception {

        SpringApplication.run(SpringbootWebApplication.class, args);
        startCrawler();
    }

    public static void startCrawler() throws Exception {
        Date date = new Date();
        String start = "开启时间 :" + date;
//        List<String> list = new ArrayList<>();
//        list.add(start);

        Log.logErr(start);

        System.out.println("开启爬虫");
        Main.main(null);
//        ThirdHandle.main(null);


        String end = "结束时间 :" + new Date();

        Log.logErr(end);

    }
}
